package com.ruoyi.system.product.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.product.mapper.ServiceBookProductWareMapper;
import com.ruoyi.system.product.domain.ServiceBookProductWare;
import com.ruoyi.system.product.service.IServiceBookProductWareService;
import com.ruoyi.common.core.text.Convert;

/**
 * 商品库存Service业务层处理
 * 
 * @author Administrator
 * @date 2021-03-06
 */
@Service
public class ServiceBookProductWareServiceImpl implements IServiceBookProductWareService 
{
    @Autowired
    private ServiceBookProductWareMapper serviceBookProductWareMapper;

    /**
     * 查询商品库存
     * 
     * @param id 商品库存ID
     * @return 商品库存
     */
    @Override
    public ServiceBookProductWare selectServiceBookProductWareById(Long id)
    {
        return serviceBookProductWareMapper.selectServiceBookProductWareById(id);
    }

    /**
     * 查询商品库存列表
     * 
     * @param serviceBookProductWare 商品库存
     * @return 商品库存
     */
    @Override
    public List<ServiceBookProductWare> selectServiceBookProductWareList(ServiceBookProductWare serviceBookProductWare)
    {
        return serviceBookProductWareMapper.selectServiceBookProductWareList(serviceBookProductWare);
    }

    /**
     * 新增商品库存
     * 
     * @param serviceBookProductWare 商品库存
     * @return 结果
     */
    @Override
    public int insertServiceBookProductWare(ServiceBookProductWare serviceBookProductWare)
    {
        return serviceBookProductWareMapper.insertServiceBookProductWare(serviceBookProductWare);
    }

    /**
     * 修改商品库存
     * 
     * @param serviceBookProductWare 商品库存
     * @return 结果
     */
    @Override
    public int updateServiceBookProductWare(ServiceBookProductWare serviceBookProductWare)
    {
        return serviceBookProductWareMapper.updateServiceBookProductWare(serviceBookProductWare);
    }

    /**
     * 删除商品库存对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteServiceBookProductWareByIds(String ids)
    {
        return serviceBookProductWareMapper.deleteServiceBookProductWareByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除商品库存信息
     * 
     * @param id 商品库存ID
     * @return 结果
     */
    @Override
    public int deleteServiceBookProductWareById(Long id)
    {
        return serviceBookProductWareMapper.deleteServiceBookProductWareById(id);
    }
}
